﻿#pragma once

#include <string>
#include <exception>

class COMException : public std::exception
{
private:
    std::string msg;

public:
    COMException(const std::string& message = "") : msg(message)
    {
    }

    const char * what() const noexcept
    {
        return msg.c_str();
    }
};

class NotImplementedException : public std::exception
{
private:
    std::string msg;

public:
    NotImplementedException(const std::string& message = "") : msg(message)
    {
    }

    const char * what() const noexcept
    {
        return msg.c_str();
    }
};

class SocketException : public std::exception
{
private:
    std::string msg;

public:
    SocketException(const std::string& message = "") : msg(message)
    {
    }

    const char * what() const noexcept
    {
        return msg.c_str();
    }
};

class FormatException : public std::exception
{
private:
    std::string msg;

public:
    FormatException(const std::string& message = "") : msg(message)
    {
    }

    const char * what() const noexcept
    {
        return msg.c_str();
    }
};

class NotSupportedException : public std::exception
{
private:
    std::string msg;

public:
    NotSupportedException(const std::string& message = "") : msg(message)
    {
    }

    const char * what() const noexcept
    {
        return msg.c_str();
    }
};

class InvalidOperationException : public std::exception
{
private:
    std::string msg;

public:
    InvalidOperationException(const std::string& message = "") : msg(message)
    {
    }

    const char * what() const noexcept
    {
        return msg.c_str();
    }
};

class ArgumentOutOfRangeException : public std::exception
{
private:
    std::string msg;

public:
    ArgumentOutOfRangeException(const std::string& message = "") : msg(message)
    {
    }

    const char * what() const noexcept
    {
        return msg.c_str();
    }
};

class IOException : public std::exception
{
private:
    std::string msg;

public:
    IOException(const std::string& message = "") : msg(message)
    {
    }

    const char * what() const noexcept
    {
        return msg.c_str();
    }
};

class Direct3D9Exception : public std::exception
{
private:
    std::string msg;

public:
    Direct3D9Exception(const std::string& message = "") : msg(message)
    {
    }

    const char * what() const noexcept
    {
        return msg.c_str();
    }
};

class Win32Exception : public std::exception
{
private:
    std::string msg;

public:
    Win32Exception(const std::string& message = "") : msg(message)
    {
    }

    const char * what() const noexcept
    {
        return msg.c_str();
    }
};

class EndOfStreamException : public std::exception
{
private:
    std::string msg;

public:
    EndOfStreamException(const std::string& message = "") : msg(message)
    {
    }

    const char * what() const noexcept
    {
        return msg.c_str();
    }
};

class UnauthorizedAccessException : public std::exception
{
private:
    std::string msg;

public:
    UnauthorizedAccessException(const std::string& message = "") : msg(message)
    {
    }

    const char * what() const noexcept
    {
        return msg.c_str();
    }
};

class WebException : public std::exception
{
private:
    std::string msg;

public:
    WebException(const std::string& message = "") : msg(message)
    {
    }

    const char * what() const noexcept
    {
        return msg.c_str();
    }
};
